package assignmentstrategy

import (
	"codejy/analysis/codeanalysis"
	"codejy/globalfunc"
	"codejy/structdef"
)

type IncrementDecrementStrategy struct {
}

func init() {
	RegisterStrategy(&IncrementDecrementStrategy{})
}
func (n IncrementDecrementStrategy) getId() int {
	return codeanalysis.IncrementDecrement
}

func (n IncrementDecrementStrategy) Execute(threadStore *structdef.ThreadStore, code string) string {
	//计算后并将结果赋值给变量
	calculate := globalfunc.ExecuteFunc("IncrementDecrementCalculate", threadStore, code).(string)
	//去掉后缀
	return calculate
}
